<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php $this->load->view('include/html_head')?>
</head>
<body>
<div id="wrapper">
	<?php $this->load->view('include/header')?>
	<?php $this->load->view('include/menu')?>
	<div id="page">
		<div id="content">
		<?php $this->load->view('include/sub_navi')?>
			<div class="post">
				<p class="meta">社联成员管理</p>
				<div class="entry">
					<style>
					.entry input { width: 195px; }
					#reset { margin-bottom: 5px; }
					</style>
					
					&nbsp;姓名：
					<input type='text' id='name' value='<?php if ($url_array[0]) { echo urldecode($url_array[0]); }?>' onchange="manage_employee_search_change();"/>
					
					<script>
					//给下拉菜单绑值
					$(function() {
						var gender_array = getAllGender();
						for (var i= 0; i < gender_array.length; i++) {
							$('#gender').append("<option value=" + (i + 1) + ">" + gender_array[i] + "</option>");
						}
						$('#gender option').each(function() {
							if($(this).val() == <?php echo $url_array[1] + "" ?>) {
								$(this).attr("selected", "selected");
							}
						});
					});
					</script>
					&nbsp;性别：
					<select id='gender' onchange="manage_employee_search_change();">
						<option value="0" selected="selected">请选择</option>
					</select>
					
					<script>
					//给下拉菜单绑值
					$(function() {
						var association_array = getAllAssociationCategory();
						for (var i= 0; i < association_array.length; i++) {
							$('#category').append("<option value=" + (i + 1) + ">" + association_array[i] + "</option>");
						}
						$('#category option').each(function() {
							if($(this).val() == <?php echo $url_array[2] + "" ?>) {
								$(this).attr("selected", "selected");
							}
						});
					});
					</script>
					&nbsp;部门：
					<select  id='category' onchange="manage_employee_search_change();">
						<option value="0">请选择</option>
					</select><br />
					
					<script>
					//给下拉菜单绑值
					$(function() {
						var col_array = getAllCol();
						for (var i= 0; i < col_array.length; i++) {
							$('#col').append("<option value=" + col_array[i][0] + ">" + col_array[i][1] + "</option>");
						}
						$('#col option').each(function() {
							if($(this).val() == <?php echo $url_array[3] + "" ?>) {
								$(this).attr("selected", "selected");
							}
						});
					});
					</script>
					&nbsp;学院：
					<select id='col' onchange="f_change_col_pro(this,document.getElementById('pro'));manage_employee_search_change();">
						<option value="0" selected="selected">请选择</option>
					</select>
						
					<script>
					//给多级联动的下级下拉菜单绑值
					$(function() {
						var val = $('#col').val();
						var pro_array = getProByColId(val);
						for (var i= 0; i < pro_array.length; i++) {
							$('#pro').append("<option value=" + pro_array[i][0] + ">" + pro_array[i][1] + "</option>");
						}
						$('#pro option').each(function() {
							if($(this).val() == <?php echo $url_array[4] + "" ?>) {
								$(this).attr("selected", "selected");
							}
						});
					});
					</script>
					&nbsp;专业：
					<select id='pro' onchange="f_change_col_pro();manage_employee_search_change();">
						<option value="0" selected="selected">请选择</option>
					</select>
					
					<a class='anchor_button' id='reset' onclick="window.location.href='<?php echo BACKEND_ASSOCIATION_EMPLOYEE_SEARCH_PATH ?>'" >重置</a><br />
					
					<?php if (!empty($search_employee)):?>
					<table class='full'>
					<thead>
						<tr>
							<th>姓名</th>
							<th style="text-align:center;" >性别</th>
							<th style="text-align:center;" >出生年月</th>
							<th style="text-align:center;" >联系方式</th>
							<th style="text-align:center;" >所属部门</th>
							<th style="text-align:center;" >操作</th>
						</tr>
					</thead>
					<tbody>
						<?php foreach ($search_employee as $v):?>
						<tr>
							<td><?php echo $v['a_name']?></td>
							<td style="text-align:center; width:45px;" ><?php echo $this->common_data->_get_gender_by_cid($v['a_gender']);?></td>
							<td style="text-align:center; width:110px;" ><?php echo $this->common->convert_birthday($v['a_birth']);?></td>
							<td style="text-align:center; width:70px;" ><?php echo $v['a_phone'];?></td>
							<td style="text-align:center; width:70px;" ><?php echo $this->common_data->_get_association_category_name_by_cid($v['a_category']);?></td>
							<td style="text-align:center; width:70px;" ><a id="<?php echo $v['employee_id']?>" class="anchor_button detail_employee_info_link"  title='查看社联成员详细信息'>详细</a></td>
						</tr>
						<?php endforeach;?>
					</tbody>
					</table>
					<div style='overflow: hidden;' id='employee_info_dialog'>
					<ul id='dialog_ul'>
					
					<fieldset>
					<legend><b>社联成员信息</b></legend>
						<li>姓名:<span id='a_name' class="span"></span></li>
						<li>性别:<span id='a_gender' class="span"></span></li>
						
						<li>生日:<span id='a_birth' class="span"></span></li>
						<li>部门:<span id='a_category' class="span"></span></li>
						
						<li>学号:<span id='a_stu_num' class="span"></span></li>
						<li>学院专业:<span id='col_pro' class="span" title=''></span></li>
		  
						<li>手机:<span id='a_phone' class="span"></span></li>
						<li>QQ&nbsp;:<span id='a_qq' class="span"></span></li>
					</fieldset>
					
					</ul>
					</div>
					
					<?php else :?>
					<span class='tip'>抱歉，没有找到相关的结果！请更改查询选项再试试!</span>
					<?php endif;?>
					<?php echo $this->pagination->create_links(); ?>	
				</div>
			</div>
			<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #content -->
		<?php $this->load->view('include/side_bar')?>
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end #page -->
</div>
<?php $this->load->view('include/footer_content')?>
<?php $this->load->view('include/footer')?>
</body>
</html>
